package com.xiaoyy.core.common.enums;
/**
 * 业务类型
 *
 * */
public enum OpTypeEnum {
    ADD("10", "新增"),
    EDIT("20", "修改"),
    DEL("30", "逻辑删除"),
    DELETE("31", "物理删除");
    private String type;
    private String text;

    OpTypeEnum(String type, String text) {
        this.type = type;
        this.text = text;
    }

    public String getType() {
        return this.type;
    }

    public String getText() {
        return this.text;
    }
    public static OpTypeEnum getByType(String type) {
        for (OpTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equalsIgnoreCase(type) ) {
                return typeEnum;
            }
        }
        return null;
    }
}
